//LCR 159
class Solution {
    class sort implements Comparator {
        @Override
        public int compare(Object o1, Object o2) {
            return (Integer) o2 - (Integer) o1;
        }
    }
    public int[] inventoryManagement(int[] stock, int cnt) {
        if (cnt == 0) {
            return new int[0];
        }
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>(new sort());
        int len = stock.length;
        for (int i = 0; i < len; i++) {
            if (i >= cnt) {
                if (stock[i] < priorityQueue.peek()) {
                    priorityQueue.poll();
                    priorityQueue.add(stock[i]);
                }
            }
            else {
                priorityQueue.add(stock[i]);
            }
        }
        int[] ret = new int[cnt];
        for (int i = 0; i < cnt; i++) {
            ret[i] = priorityQueue.poll();
        }
        return ret;
    }
}
//183
# Write your MySQL query statement below

SELECT Customers.name as Customers from Customers left join Orders on 
Customers.id=Orders.customerId where Orders.customerId<=>null;
//189
class Solution {
    public int mechanicalAccumulator(int target) {
        return target == 0 ? 0 : target+mechanicalAccumulator(target-1);
    }
}